<template>
  <div class="card-wrap flex-column justify-end card-padding" v-if="form.undoReplacement">
    <el-form :model="form" ref="cancelTheChangeSupplier" label-width="100px">
      <div class="card-title-wrap">
        <span>撤销更换供应商信息</span>
        <span></span>
      </div>
      <!--撤销收车信息详情模块 -->
      <el-row :gutter="10">
        <el-col :span="6">
          <el-form-item label="操作时间:">
            <span>{{ form.undoReplacement.createTime }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="操作人:">
            <span>{{ form.undoReplacement.createBy }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="说明:">
        <span>{{ form.undoReplacement.notes }}</span>
      </el-form-item>
      <el-form-item label="附件:">
        <ImageCommon :up-type="2" v-model="form.undoReplacement.attachments" disabled></ImageCommon>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import SearchContent from "@/components/SearchContent/index.vue";
export default {
  // 撤销收车
  name: 'cancelTheChangeSupplier',
  components: {
    SearchContent
  },
  props: {
    value: {
      type: Object,
      default: {},
    },
    state: {
      type: String,
      default: '',
    },
  },
  computed: {
    form: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("input", val);
      },
    },
    type() {
      let status
      switch (this.state) {
        case 'write':
          status = 'edit'
          break
        case 'disabled':
          status = 'detail'
          break
        case 'readonly':
          status = 'detail'
          break
        case 'detail':
          status = 'detail'
          break
        case 'edit':
          status = 'edit'
        case 'add':
          status = 'add'
          break
      }
      return status
    },
  },
  data() {
    return {
    };
  },
  created() {
  },
  methods: {

  },
};
</script>
<style lang="scss" scoped>
</style>
